import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/demo/cropperjs',
        name: 'Cropperjs',
        component: () => import('../views/demo/Cropperjs.vue')
    } ,
    {
        path: '/demo/awesome',
        name: 'Awesome',
        component: () => import('../views/demo/Awesome.vue')
    } ,
    {
        path: '/demo/vxeTable1',
        name: 'VxeTable1',
        component: () => import('../views/demo/VxeTable1.vue')
    } ,
    {
        path: '/demo/vxeTable2',
        name: 'VxeTable2',
        component: () => import('../views/demo/VxeTable2.vue')
    } ,
    {
        path: '/demo/vxeTable3',
        name: 'VxeTable3',
        component: () => import('../views/demo/VxeTable3.vue')
    } ,
    {
        path: '/demo/vxeTable4',
        name: 'VxeTable4',
        component: () => import('../views/demo/VxeTable4.vue')
    } ,
    {
        path: '/demo/vxeTable5',
        name: 'VxeTable5',
        component: () => import('../views/demo/VxeTable5.vue')
    } ,
    {
        path: '/demo/xgplayer',
        name: 'Xgplayer',
        component: () => import('../views/demo/Xgplayer.vue')
    } ,
    {
        path: '/demo/mockjs',
        name: 'Mockjs',
        component: () => import('../views/demo/Mockjs.vue')
    } ,
    {
        path: '/demo/echarts',
        name: 'Echarts',
        component: () => import('../views/demo/Echarts.vue')
    } ,
    /////////////////////////////////////////////////////////////////////
    {
        path: '/i',
        name: 'Index',
        component: () => import('../views/Index.vue')
    } ,
    {
        path: '/other',
        name: 'Other',
        component: () => import('../views/Other.vue')
    }
]
// 历史模式
const router = createRouter({
    history: createWebHashHistory(), // 生产环境可以直接使用
    // history: createWebHistory(), //生产环境需要配置转发，比如使用Nginx，否则会出现白屏、404等，对SEO有好处
    routes
})

export default router
